home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / grafik / bildanzeiger / superview-lib_dev / example_svdrivers / ecs / sd_recogsubs.c < prev    next >
C/C++ Source or Header  |  1995-03-09  |  1KB  |  60 lines

  1.  
  2.  /* SD_RecogSubs.c
  3.     - Functions for External Module Recognition and Binding -
  4.     (c) 1993-94 by Andreas R. Kleinert
  5.     Last changes : 05.03.1994
  6.  */
  7.  
  8.  
  9. #include "svdriver.h"
  10.  
  11. #include <exec/execbase.h>
  12.  
  13. void __saveds __stdargs SVLI_InitSVDList(void);
  14.  
  15. void __saveds __stdargs SVLI_InitSVDList(void)
  16. {
  17.  struct SVD_DriverNode *svd_node = N;
  18.  
  19.  SVDriverBase->svb_SVDriver = N;
  20.  
  21.  if(FindName(&SysBase->LibList, "superview.library"))
  22.   {
  23.    struct SuperViewBase *SuperViewBase = (APTR) OpenLibrary("superview.library", 2);
  24.  
  25.    if(SuperViewBase)
  26.     {
  27.      SVDriverBase->svb_SVDriver = (APTR) FindName((APTR) &SuperViewBase->svb_SVDriverList, "SVO.svobject");
  28.  
  29.      CloseLibrary((APTR) SuperViewBase);
  30.     }
  31.   }else
  32.   {
  33.    svd_node = AllocVec(sizeof(struct SVD_DriverNode), (MEMF_CLEAR|MEMF_PUBLIC));
  34.  
  35.    if(!svd_node) return;
  36.  
  37.    SVDriverBase->svb_SVDriver = svd_node;
  38.  
  39.    ((struct Node *)svd_node)->ln_Type = NT_UNKNOWN;
  40.    ((struct Node *)svd_node)->ln_Pri  = 1;
  41.    ((struct Node *)svd_node)->ln_Name = svd_node->svd_FileName;
  42.  
  43.    /* don't forget to initialized svd_node->ln_Name :
  44.       inside SVDrivers it's not NULL !!
  45.     */
  46.  
  47.    svd_node->svd_Version = SVD_VERSION;
  48.  
  49.    svd_node->svd_Flags = SVDF_INTUITION;
  50.  
  51.    strcpy(svd_node->svd_FileName, "ECS.svdriver");
  52.    
  53.    svd_node->svd_MaxWidth  = 0xFFFFFFFF;
  54.    svd_node->svd_MaxHeight = 0xFFFFFFFF;
  55.    svd_node->svd_MaxDepth  = 0xFFFFFFFF;
  56.  
  57.    strcpy(svd_node->svd_ID, "ECS ScreenDriver");
  58.   }
  59. }
  60.